package com.meeting.controller.admin;

import com.meeting.dto.LoginDTO;

import com.meeting.service.AdminService;
import com.meeting.vo.Result;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/admin")
@Tag(name = "管理员接口")
@Slf4j
public class AdminLoginController {

    @Autowired
    private AdminService adminService;

    @PostMapping("/login")
    @Operation(summary = "管理员登录")
    public Result login(@RequestBody LoginDTO loginDTO){
        log.info("管理员登录{}",loginDTO);
        return adminService.login(loginDTO);
    }


}
